
#include <stdio.h>

#include "get_wifi_ap.h"

void show_wlist(WIFI_AP_INFO_LIST *list)
{
    if (list != NULL)
    {
        int i = 0;
        for (; i < list->len; ++i)
        {
            printf("%-2d\t%-30s\t%-20s\t%-3d\n",
                   list->ap_info[i].channel,
                   list->ap_info[i].ssid,
                   list->ap_info[i].bssid,
                   list->ap_info[i].siganl);
        }
    }
    else{
        printf("list is NULL\n");
    }
}

int main()
{

    WIFI_AP_INFO_LIST *list = softap_get_scan_res();
    show_wlist(list);

    softap_apinfo_free(list);
    return 0;
}